﻿@{
    ViewBag.Title = Resources.SignIn;
    Layout = "~/Views/Shared/_Root.cshtml";
}
<div id="loginform" title="@Resources.SigninTo" class="logon-container">
    @using (Html.BeginForm())
    {  @Html.ValidationSummary(true)
           
        <h1>
            <span class="log-in">@Resources.SigninTo</span></h1>
        <p class="float">
            <label for="username">
                @Resources.Username</label>
            @Html.TextBox("username", null)
            @Html.ValidationMessage("username")
        </p>
        <p class="float">
            <label for="password">
                @Resources.Password</label>
            @Html.Password("password", null, new { @class = "showpassword" })
            @Html.ValidationMessage("password")
        </p>
        <p class="opt">
            @Html.CheckBox("rememberMe", new { @class = "showpasswordcheckbox" }) @Resources.Rememberme
        </p>
        <p class="clearfix">
            @Html.ActionLink(Resources.Register, "Register", "Account", null, new { @id = "register", @class = "log-twitter" })
            <input type="submit" value="@Resources.SignIn" />
        </p>
           
    }
</div>
<script type="text/javascript">
//    Sys.require(["jquery.validate.unobtrusive", "MicrosoftMvcAjax", "jquery.unobtrusive-ajax"]);

//    function onFormCompleted(result) {
//        if (result.responseText.indexOf('DOCTYPE') > 0) {
//            alert(result.responseText);
//            $('.logon-container').html(result.responseText);
//        }
//        else {
//            var value = JSON.parse(result.responseText);
//            if (!!value && value.Status == "authenticated") {
//                window.parent.$.colorbox.close();
//                window.parent.location.reload();
//            }
//        }
//    }
</script>
